<?php
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
if (get_user_class() < $staffmem_class) {
	stderr("错误", "权限不足");
}
stdhead("小公告设置");
$aurl = "[url]" . get_protocol_prefix() . $BASEURL . "[/url]";
$burl = "[url=" . get_protocol_prefix() . $BASEURL . "]" . PROJECTNAME . "[/url]";
$notice = mysql_fetch_array(sql_query("SELECT noticeoff, notice FROM notice ORDER BY id DESC LIMIT 1"));
?>
<div>
	<form method="post" action="takenotice.php">
		是否开启小公告：<input name="noticeoff" type="radio" <?= $notice['noticeoff'] == 'yes' ? "checked" : "" ?> value="yes" />开<input name="noticeoff" type="radio" <?= $notice['noticeoff'] == 'no' ? "checked" : "" ?> value="no" />关<br /><br />
		<textarea name='notice' style='width:600px; height:200px;'><?= $notice['notice'] ?></textarea><br /><br />
		<table style="background:none repeat scroll;" align="center">
			<td>
				<div style="margin:10px;">
					代码：<?= $aurl ?><br />效果：<?= format_comment($aurl) ?><hr>
					代码：<?= $burl ?><br />效果：<?= format_comment($burl) ?><hr>
					遵循BBCode语法，<a href="tags.php" target="_blank">点此查看</a>
				</div>
			</td>
		</table><br />
		<input type="submit" name="submit" value="提交" />
	</form>
</div>
<?php
stdfoot();
